package cn.bqjr.eily.core.log;

import cn.bqjr.eily.core.annotation.AutoLogable;
import org.aspectj.lang.JoinPoint;

import javax.servlet.http.HttpServletRequest;

/**
 * AOP日志请求实体
 * @author hillfly
 * @create 2017-06-30 16:39
 **/
public class LogAopEntity {
    private String requestId;                   //请求ID
    private String methodName;                  //请求方法名
    private AutoLogable logAnno;
    private JoinPoint point;
    private boolean isHttpRequest = false;      //是否为http请求
    private HttpServletRequest request;

    public String getRequestId() {
        return requestId;
    }

    public LogAopEntity setRequestId(String requestId) {
        this.requestId = requestId;
        return this;
    }

    public String getMethodName() {
        return methodName;
    }

    public LogAopEntity setMethodName(String methodName) {
        this.methodName = methodName;
        return this;
    }

    public AutoLogable getLogAnno() {
        return logAnno;
    }

    public LogAopEntity setLogAnno(AutoLogable logAnno) {
        this.logAnno = logAnno;
        return this;
    }

    public JoinPoint getPoint() {
        return point;
    }

    public LogAopEntity setPoint(JoinPoint point) {
        this.point = point;
        return this;
    }

    public boolean isHttpRequest() {
        return isHttpRequest;
    }

    public LogAopEntity setHttpRequest(boolean httpRequest) {
        isHttpRequest = httpRequest;
        return this;
    }

    public HttpServletRequest getRequest() {
        return request;
    }

    public LogAopEntity setRequest(HttpServletRequest request) {
        this.request = request;
        return this;
    }
}
